import axios from './axiosFun';


//获取所有帖子的列表
export const getPost = (params) => {return axios.post("/post/getList",params)}

//发表帖子，更新或者添加都走这里
export const publishPost = (param1,params) => {return axios.post("/post/publishPost?userId="+param1,params)}

//获取点击的那个帖子的详情信息
export const getOnePost = (param) => {return axios.get("/post/getOne?id="+param)}

//用户点击修改自己的帖子获取那个帖子的详情信息
export const getOne = (param) => {return axios.get("/post/getPost?id="+param)}

//获取自己所有帖子的列表
export const getPosts = (params) => {return axios.post("/post/getPosts",params)}

//删除帖子
export const deletePost = (param) => {return axios.get("/post/deletePost?id="+param)}

